<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">项目名称</td><td id="bid_name" class="tv colorlan"></td><td class="tt">项目状态</td><td id="state_name" class="tv"></td></tr>
                <tr><td class="tt">项目编号</td><td id="number" class="tv"></td><td class="tt">项目类型</td><td id="bidtype_name" class="tv"></td></tr>
                <tr><td class="tt">项目所在地</td><td id="areas" class="tv"></td><td class="tt">招标方</td><td id="zhaoname" class="tv"></td></tr>
                <tr><td class="tt">招标方式</td><td id="zhaotype_name" class="tv"></td><td class="tt">投标负责人</td><td id="touer_name" class="tv"></td></tr>
                <tr><td class="tt">开标日期</td><td id="kaidt" class="tv"></td><td class="tt">开标方式</td><td id="tou_kaitype" class="tv"></td></tr>
                <tr><td class="tt">项目所属单位</td><td id="chanid_name" class="tv"></td><td class="tt">项目属性</td><td id="business_name" class="tv"></td></tr>
                <tr><td class="tt">投标报价(元)</td><td id="tou_fee" colspan="3" class="tv"></td></tr>
                </tbody>
            </table>
        </div>
        <div class="table-box tablenes">
            <div class="title">总结信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">综合排名</td><td id="rank" colspan="3" class="tv"></td></tr>
                <tr><td class="tt">商务标排名</td><td id="rank_business" class="tv"></td><td class="tt">技术标排名</td><td id="rank_technology" class="tv"></td></tr>
                <tr><td class="tt">中标/未中标说明</td><td id="reason" colspan="3" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td id="explain" colspan="3" class="tv"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo">明细</script>
            <div class="tableShow">
                <table id="datalist" lay-filter="datalist"></table>
            </div>
        </div>



        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_bid_sum_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data;
                var bidinfo = res.data.bidinfo

                $("#bid_name").text(bidinfo.name).click(function () {
                    openPage('../bid/show.php?id='+bidinfo.id);
                });

                $('#state_name').html(bidinfo.state_name);
                $('#number').text(bidinfo.number);
                $('#bidtype_name').text(bidinfo.bidtype_name);
                $('#areas').text(bidinfo.areas);
                $('#zhaoname').text(bidinfo.zhaoname);
                $('#zhaotype_name').text(bidinfo.zhaotype_name);
                $('#touer_name').text(bidinfo.touer_name);
                $('#kaidt').text(bidinfo.kaidt);
                $('#tou_kaitype').text(bidinfo.tou_kaitype);
                $('#chanid_name').text(bidinfo.chanid_name);
                $('#business_name').text(bidinfo.business_name);
                $('#tou_fee').text(bidinfo.tou_fee);


                $('#rank').text(data.rank);
                $('#rank_business').text(data.rank_business);
                $('#rank_technology').text(data.rank_technology);
                $('#reason').text(data.reason);
                $('#explain').text(data.explain);


                var mytableList = table.render({
                    elem: "#datalist",data: res.data.list, toolbar: '#toolbarDemo', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'unit', title: '投标单位'}
                        ,{field: 'money', title: '投标报价(元)'}
                        ,{field: 'rate', title: '下浮率(%)'}
                        ,{field: 'clause', title: '特殊条款'}
                        ,{field: 'sort', title: '综合排名'}
                        ,{field: 'explain', title: '备注'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });
                // $(".pageshowtitle").text('投标总结');

                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('bid_sum', param_id);
        showpage_dropopt();
    });



</script>
</body>
</html>




